package pl.softech.gpw.candles.patterns.impl2;

import pl.softech.gpw.candles.Candle;
import pl.softech.gpw.model.FInstrument;

public class PatternRecognizer {

    public boolean test(Candle[] pattern, FInstrument[] finstruments) {
        
        Candle[] candles = Candle.create(finstruments, pattern.length);
        
        for(IRule rule : CandleRules.values()) {
            if(!rule.match(candles, candles)) {
                return false;
            }
        }
        
        return true;
    }
    
}
